home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8873 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: goanna.cs.rmit.EDU.AU!not-for-mail
  2. From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 27 Feb 1996 14:56:11 +1100
  6. Organization: Comp Sci, RMIT, Melbourne, Australia
  7. Message-ID: <4gtvcr$bo0@goanna.cs.rmit.EDU.AU>
  8. References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com>   <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com> <4ggshe$7bk@goanna.cs.rmit.EDU.AU> <4gmp2o$ian@ux1.lmu.edu> <312FDB27.4B83@inav.net>
  9. NNTP-Posting-Host: goanna.cs.rmit.edu.au
  10. X-Newsreader: NN version 6.5.0 #0 (NOV)
  11.  
  12. JR Crosmer <rainbow@inav.net> asks about c++
  13. >What is the status of the plain/ordinary/but very noticably forgotten boolean?
  14.  
  15. Not forgotten.  The 28 April 1995 draft lists
  16.     bool    false    true
  17. as keywords.  There are some oddities, notably that
  18.     boolvar++;
  19. is defined to have the same effect as
  20.     boolvar = true;
  21. which will not impress readers of comp.lang.ada.
  22.  
  23. If you haven't already got them, then
  24.     #define bool int
  25.     #define false 0
  26.     #define true 1
  27. will be a workable substitute (LC-lint already assumes this).
  28.  
  29. A new header <bool.h> making these keywords available in C has been proposed
  30. for the revised C standard.
  31.  
  32. The fundamental problem is that the mistakes a language _doesn't_ allow are
  33. almost as important as the good things it _does_ allow, and C and C++ have
  34. a lot of old code to be compatible with.  This doesn't mean that strict
  35. checking is not possible, only that compilers are unlikely to do it by
  36. default.  If only there were an LC-lint++ ...
  37.  
  38. -- 
  39. Election time; but how to get Labor _out_ without letting Liberal _in_?
  40. Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
  41.